/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.knowledge.facts;

import com.environment.Aim;
import com.environment.Tile;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 *
 * @author keithballantyne
 */
public class FriendlyAntFact extends Fact {
    HashMap<Class,Fact> factReference = new HashMap<Class,Fact>();

    public FriendlyAntFact(Tile tile) {
        location = tile;
    }

    @Override
    public String getName() {
        return "Friendly ant at "+location;
    }

    public void setReference(Fact fact) {
        factReference.put(fact.getClass(), fact);
    }
    
    public void clearReference(Class cl) {
        factReference.remove(cl);
    }
    
    public boolean hasReference(Class cl) {
        return (factReference.containsKey(cl));
    }

    public Fact getReference(Class cl) {
        return factReference.get(cl);
    }
        
    public List<Fact> getAllReferences() {
        List<Fact> retval = new ArrayList<Fact>(factReference.values());
        return retval;
    }
}
